package com.infore.airsupervise.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.infore.airsupervise.R;
import com.infore.airsupervise.adapter.StationExpandAdapter;
import com.infore.airsupervise.app.Constants;
import com.infore.airsupervise.bean.MenuE;
import com.infore.airsupervise.ui.fragment.StationTreeFragment;

import butterknife.ButterKnife;


/**
 * 统计模块 基本信息 列表界面
 * Created by xiaotao on 2017/8/11.
 */

public class StationListActivity extends BaseTitleBarActivity {



    private StationTreeFragment stationTreeFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_station_tree_list);
        ButterKnife.bind(this);
        Intent it = getIntent();
        if (it != null) {
            MenuE menuE = (MenuE) it.getSerializableExtra(Constants.INTENT_OBJ_KEY);
            if (null != menuE) {
                //titleBar
                title.setText("站点列表");
            }
        }
        initView();
    }

    private void initView() {
        rightMenu.setVisibility(View.INVISIBLE);
        //
        if (stationTreeFragment == null ){
            stationTreeFragment = new StationTreeFragment();
            stationTreeFragment.setCurType(StationExpandAdapter.NO_SELECTE);
        }
        getSupportFragmentManager().beginTransaction().add(R.id.layout_content , stationTreeFragment).commit();
    }


}
